package packageClass;

import java.text.DecimalFormat;

public class DecimalFormatDemo {
	
	public static void SimpleFormat(String pattern,double value){
		DecimalFormat myFormat=new DecimalFormat(pattern);
		String output=myFormat.format(value);
		System.out.println(value+ " "+pattern+" "+output);
	}
	
	public static void UseApplyPatternMethodFormat(String pattern,double value){
		DecimalFormat myFormat=new DecimalFormat();
		myFormat.applyPattern(pattern);
		System.out.print(value+" "+pattern+" "+myFormat.format(value));
	}
	
	public static void main(String[] args){
		
	}

}
